home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 248 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1015 b 

  1. Path: ix.netcom.com!netnews
  2. From: a1s@ix.netcom.com (Andrew Snyder)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: prefix vs. postfix
  5. Date: Wed, 03 Jan 1996 21:05:23 GMT
  6. Organization: Netcom
  7. Message-ID: <4cegko$20s@ixnews5.ix.netcom.com>
  8. References: <00001a80+00006591@msn.com>
  9. NNTP-Posting-Host: ix-har5-09.ix.netcom.com
  10. X-NETCOM-Date: Wed Jan 03 10:07:20 AM PST 1996
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. RNorman@msn.com (Richard Norman) wrote:
  14.  
  15. >Am I the only one in the world who writes loops as:
  16. >    for (i=0; i<i_max; ++i) ...?
  17. >        
  18. >Note the prefix, ++i.  Virtually all the program examples I see
  19. >use the postfix, i++.
  20.  
  21. --snip
  22. >Is there a some occult force hidden here?  Does someone know the
  23. >cultural history of this burning question?
  24.  
  25. >(Please note -- I am NOT asking which form is "correct")
  26.  
  27. I think it is an accident of history.  Any good compiler should make
  28. the same code unless the side effect (++i or i++) makes a difference.
  29. Andrew Snyder
  30. a1s@ix.netcom.com
  31. char disclaimer[] = {'\0'}; /* I'm on cash net */
  32.  
  33.